#ifndef VIDEOWIDGET_H
#define VIDEOWIDGET_H

#include <QWidget>
#include <QImage>
#include <QMutex>

class VideoWidget : public QWidget
{
    Q_OBJECT
    
public:
    explicit VideoWidget(QWidget *parent = nullptr);
    ~VideoWidget();

public slots:
    void updateImage(const QImage& image,int64_t ptsMs);

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    QImage m_currentImage;
    QMutex m_frameMutex;

};

#endif // VIDEOWIDGET_H